<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	//注册会员
	$item=model('core/member')->detail($_SESSION['uid'],array('credit1','credit2','credit3','mobile','avatar','nickname'));
	$item['id']=$_SESSION['uid'];
	$return['setting']=$return['pluginset'];
	$return['type']=0;
	$return['item']=$item;
	set_html('title','会员中心');
	exi($return);
}
if($_RQ['op']=='get_list'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
	if($_RQ['keyword']){
		$params['title like']='%'.trim($_RQ['keyword']).'%';
	}
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$total='';
	$list=pdo_getslice('jy_wenjuan_log',$params,array($pindex,$psize),$total,$fields,'','createtime desc');
	if($list){
		foreach($list as &$item){
			$item['title']=pdo_getcolumn('jy_wenjuan_list',array('uniacid'=>$_SESSION['uniacid'],'id'=>$item['datiid']),'title');
			$item['createtime']=date('Y-m-d H:i:s', $item['createtime']);
		}
	}
	$return['list']=$list;
	exi($return);
}
?>